


import os
import traceback  # 返回堆栈运行信息
import time
import Utils


import sys
DEBUG = True if sys.gettrace() else False


logContent = "运行日志: %s\n\n" % round(time.time())
def PrintException():
    Print(traceback.format_exc())


def Print(str1):
    if DEBUG:
        print(str1)
    else:
        global logContent
        logContent += '%s\n' % str1

def ExportLog():
    Utils.writeInFile('./log.txt', logContent)